<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	template="/WEB-INF/templates/default.xhtml">
	<ui:define name="content">

		<h:form>
			<h:panelGrid columns="2">
				<h:outputLabel value="Categoria" />
				<h:inputText value="#{categoriaBean.model.descricao}"
					required="true" />
			</h:panelGrid>
			<h:commandButton value="Adicionar"
				actionListener="#{categoriaBean.doSave}" />

			<h:dataTable var="var" value="#{categoriaBean.list}">
				<f:facet name="header">Ajax Sorting</f:facet>
				<p:column sortBy="#{var.descricao}">
					<f:facet name="header">
						<h:outputText value="Descricao" />
					</f:facet>
					<h:outputText value="#{var.descricao}" />
				</p:column>
			</h:dataTable>
		</h:form>

	</ui:define>
</ui:composition>
